# Packager: Justin "juster" Davis <jrcd83@gmail.com>
# $Id: PKGBUILD 86659 2013-03-20 23:25:22Z eric $

pkgname=perl-local-lib
pkgver=1.008009
pkgrel=1
pkgdesc="create and use a local lib/ for perl modules with PERL5LIB"
arch=(any)
license=(PerlArtistic GPL)
options=(!emptydirs)
depends=('perl>=5.8.1')
url="https://metacpan.org/release/local-lib"
source=("http://search.cpan.org/CPAN/authors/id/A/AP/APEIRON/local-lib-${pkgver}.tar.gz")
md5sums=('96e6216d582488b1a598aa1300e05e05')

build()
(
    export PERL_MM_USE_DEFAULT=1 PERL5LIB=""                 \
      PERL_AUTOINSTALL=--skipdeps                            \
      PERL_MM_OPT="INSTALLDIRS=vendor"     \
      PERL_MB_OPT="--installdirs vendor" \
      MODULEBUILDRC=/dev/null

    cd local-lib-${pkgver}
    /usr/bin/perl Makefile.PL
    make
)

check()
(
    export PERL_MM_USE_DEFAULT=1 PERL5LIB=""
    cd local-lib-${pkgver}
    make test
)

package() {
    cd local-lib-${pkgver}
    make DESTDIR="$pkgdir" install
}

# Local Variables:
# mode: shell-script
# sh-basic-offset: 2
# End:
# vim:set ts=2 sw=2 et:
